Hi all, i want to create a Dialogbox... I need a function to close the DB, like i press "Yes" => Do something AND close the DB window
DB diaBox = create ("Test", styleStandard);
label(diaBox, "Test");
void closeBox(DB diaBox)
{
hide diaBox
print "hide"
}
void yesOrder(DB diaBox)
{
//Do something and close the window
close(diaBox, false, closeBox)
}
apply(diaBox, "YES", yesOrder);
show diaBox;
But if i press "YES" the window ("Test") is still open meinhana - Mon Aug 17 03:58:42 EDT 2015 |
Re: DialogBox Question hi !
I think the line 'close(diaBox, false, closeBox)' just attempts to define what to do when the close button is pressed.
DB diaBox = create ("Test", styleStandard);
label(diaBox, "Test");
void closeBox(DB x){ hide x; destroy x }
void yesOrder(DB diaBox) {
//Do something and close the window
closeBox(diaBox)
}
apply(diaBox, "YES", yesOrder);
close(diaBox, false, closeBox);
show diaBox;
|
Re: DialogBox Question pommCannelle - Mon Aug 17 04:23:39 EDT 2015 hi !
I think the line 'close(diaBox, false, closeBox)' just attempts to define what to do when the close button is pressed.
DB diaBox = create ("Test", styleStandard);
label(diaBox, "Test");
void closeBox(DB x){ hide x; destroy x }
void yesOrder(DB diaBox) {
//Do something and close the window
closeBox(diaBox)
}
apply(diaBox, "YES", yesOrder);
close(diaBox, false, closeBox);
show diaBox;
Thank you! |